<template>
<div class="layout">
  <head :backFlag="false" :navBar="100">
    <div slot="center" class="logoBox" @click="searchClick('')">
      <image class="mlogo" src="root:img/mlogo.png" />
      <text class="logoTxt">GIV</text>
    </div>
    <div class="rightBox" slot="right" @click="rightClick">
      <text class="leftIcon iconfont">&#xe600;</text>
    </div>
  </head>
  <div class="pageContent">
    <div class="header"></div>
    <list class="scroller" loadmoreoffset="30">
      <refresh class="refresh" @refresh="onrefresh" :display="refreshing ? 'show' : 'hide'">
        <loading-indicator class="indicator"></loading-indicator>
      </refresh>
      <cell>
        <div class="inputbox" @click="searchClick('')">
          <text class="searchIcon iconfont">&#xe62a;</text>
          <text class="noteBook">Notebook</text>
        </div>
      </cell>
      <cell>
        <div class="cicle"></div>
        <div class="cicleContent">
          <div class="silderBox" v-if="bannerList.length>0">
            <slider class="slider" interval="3000" auto-play="false">
              <div
                class="frame"
                v-for="(img,index) in bannerList"
                :key="index"
                @click="toBanner(img)"
              >
                <image class="image" resize="cover" :src="img.image_url" />
              </div>
              <indicator class="indicators"></indicator>
            </slider>
          </div>
        </div>
      </cell>
      <cell>
        <div class="bgcf">
          <div class="tabSection">
            <div
              class="tabItem"
              v-for="(item,index) in tabSection"
              :key="index"
              @click="searchClick(item)"
            >
              <image class="tabImg" :src="item.img" resize="cover" />
              <text class="tips">{{item.title}}</text>
            </div>
          </div>
        </div>
      </cell>
      <!-- 秒杀一元夺宝 -->
      <cell>
        <div class="bgcf" v-if="showActive">
          <div class="subSection">
            <div class="leftSub" @click="push('root:app/active/secKill.js')">
              <div class="subTop">
                <text class="topTitle">Limited Time Offer</text>
                <div class="timeOut">
                  <text class="timeNum">{{countdown.h}}</text>
                  <text class="timesyb">:</text>
                  <text class="timeNum">{{countdown.m}}</text>
                  <text class="timesyb">:</text>
                  <text class="timeNum">{{countdown.s}}</text>
                </div>
              </div>
              <image class="limitImg" src="root:img/limit.png" />
            </div>
            <div class="rightSub" @click="push('root:app/active/preferential.js')">
              <div class="titleBox">
                <text class="rightTitle">Today’s Deals</text>
                <!-- <text class="rightContent">Limited time sales</text> -->
              </div>
              <text class="rightBtn">Details</text>
            </div>
          </div>
        </div>
      </cell>
      <!-- 幸运转盘 -->
      <cell>
        <div class="bgcf">
          <image @click="checkLuckFlag" class="luckImg" src="root:img/luck.png" />
        </div>
      </cell>
      <!-- 附近的商品 -->
      <cell>
        <div class="bgcf">
          <div class="secondHand">
            <div class="secondTitle" @click="getNearBy()">
              <text class="titleName">Nearby</text>
              <text class="iconfont secondIcon">&#xe6a1;</text>
            </div>
            <scroller
              scroll-direction="horizontal"
              class="secondContent"
              v-if="secondList.length>0"
            >
              <div
                class="listItem"
                v-for="(item,index) in secondList"
                :key="index"
                v-if="item.users_id!=userId||!userId"
                @click="push('root:app/goods/goods2.js',{id:item.id,type:item.type})"
              >
                <image class="SecondImg" :src="item.thumb" />
                <div class="secondItem">
                  <text class="goodsTitle">{{item.title}}</text>
                  <text class="goodsDistance" v-if="item.distance">{{item.distance/1000}}KM</text>

                  <div class="secondPrice">
                    <text class="symbol">AU$</text>
                    <text class="money">{{item.price}}</text>
                  </div>
                </div>
              </div>
              <div class="moteNox">
                <text class="moreLink" @click="gonext('root:app/main/center.js' )">MORE >></text>
              </div>
            </scroller>
          </div>
        </div>
      </cell>
      <cell>
        <div class="bgcf">
          <div class="recommend">
            <div class="retitle">
              <text class="fz30">Recommended</text>
              <!-- <text class="iconfont reIcon">view more &#xe6a1;</text> -->
            </div>
            <div class="recontent">
              <div
                class="reitem"
                v-for="(item,index) in shopList"
                :key="index"
                @click="push('root:app/goods/goods.js',{id:item.id})"
              >
                <image class="goodsImg" :src="item.thumb" resize="cover" />
                <div class="contentBox">
                  <text class="goodsTitle2">{{item.title}}</text>
                  <div class="priceInfo">
                    <div class="secondPrice">
                      <text class="symbol">AU$</text>
                      <text class="money">{{item.price}}</text>
                      <!-- <text class="reduce">80%</text> -->
                      <!-- <text class="shopType">NEW</text> -->
                    </div>
                    <div class="leftInfo">
                      <!-- <text class="iconfont shopIcon">&#xe64c;</text>
                      <text class="iconfont shopIcon">&#xe634;</text>
                      <text class="iconfont shopIcon">&#xe607;</text>-->
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>

        <!-- <div class="loadingbox" v-if="hasMore" @click="onloadmore">
          <image class="loading" src="root:img/moreLoad.png" />
        </div>
        -->
        <text class="loadingbox" v-if="!hasMore">No more</text>
      </cell>

      <loading
        class="loadingMore"
        v-if="hasMore"
        @loading="onloadmore"
        :display="loadinging ? 'show' : 'hide'"
      >
        <loading-indicator class="indicator"></loading-indicator>
      </loading>
    </list>
  </div>
  <div class="tipsMask" v-if="showLocaTip " @click="e=>e.stopPropagation()">
    <div class="locaTip">
      <text class="locatipCen">Whether to allow this app to enable geographic location</text>
      <text class="locationItem" @click="setpremish(1)">Only allowed to use during the app</text>
      <text class="locationItem" @click="setpremish(1)">All the time</text>
      <text class="locationItem" @click="setpremish(1)">Refused</text>
    </div>
  </div>
</div>
</template>
<script>
import asCore from "../../mixin/core";
import {
  get_goods_list,
  get_banner_list,
  get_goods_list_nearby,
  get_category_list,
  coRefundTake,
  getPrompt
} from "../../mixin/ajax.js";
export default {
  props: {
    userId: {
      default: ""
    }
  },

  data() {
    return {
      showActive: false,
      loadinging: false,
      showLocaTip: false,
      loadCate: false,
      page: 1,
      raffleStatus: 1,
      latitude: "",
      longitude: "",
      hasMore: true,
      refreshing: false,
      shopTotal: 0,
      bannerList: [{}], //banner图
      tabSection: [
        {
          id: 100,
          img: "root:img/nav1.png",
          title: "Grocery"
        },
        {
          id: 91,
          img: "root:img/nav7.png",
          title: "Fruit & Veg"
        },
        {
          id: 90,
          img: "root:img/nav8.png",
          title: "Beverages"
        },

        {
          id: 96,
          img: "root:img/nav4.png",
          title: "Appliances"
        },
        {
          id: 93,
          img: "root:img/nav5.png",
          title: "Office"
        },
        {
          id: 92,
          img: "root:img/nav6.png",
          title: "Asian Food"
        },
        {
          id: 99,
          img: "root:img/nav2.png",
          title: "Household"
        },
        {
          id: 98,
          img: "root:img/nav3.png",
          title: "Health & Beauty"
        }
      ],
      countdown: {}, //倒计时
      secondList: [],
      shopList: []
    };
  },
  created() {
    let that = this;
    that.loadPromotion();
    if (this.userId) {
      getPrompt({}, (res, flag) => {
        if (flag && res.code == 0 && res.data.status == 1) {
          var pref = weex.requireModule("storage");
          pref.getItem("promptYes", res1 => {
            pref.setItem("promptYes", res.data.content);
            if (res1.result == "success") {
              if (res1.data != res.data.content) {
                this.alert(res.data.content);
              }
            } else {
              this.alert(res.data.content);
            }
          });
        }
      });
    }
    var pref = weex.requireModule("storage");
    pref.getItem("mainBanner", event => {
      if (event.result == "success") {
        that.bannerList = JSON.parse(event.data);
      }
    });
    pref.getItem("mainSecond", event => {
      if (event.result == "success") {
        that.secondList = JSON.parse(event.data);
      }
    });
    pref.getItem("mainGoods", event => {
      if (event.result == "success") {
        that.shopList = JSON.parse(event.data);
      }
    });
  },
  methods: {
    /**页面加载 */
    loadData(usersid) {
      let that = this;
      that.page = 1;
      get_banner_list({ type: 1 }, (res, flag) => {
        if (flag) {
          if (res.code == "200") {
            that.bannerList = res.data;
            var pref = weex.requireModule("storage");
            pref.setItem("mainBanner", JSON.stringify(res.data));
          } else {
            that.bannerList = [];
            that.toast(res.message);
          }
        }
      });
      this.getLuckRuller();
      this.getNearByList();
      this.getGoodList();
    },
    /** */
    checkLuckFlag() {
      if (!this.userId) {
        this.alert("Please sign in first");
        return false;
      }
      if (this.raffleStatus == 1) {
        this.push("root:app/active/luck.js");
      } else {
        this.alert("Coming soon!");
      }
    },
    /**banner跳转 */
    toBanner(item) {
      this.log(item);
      if (item.type) {
        if (item.type == "1") {
          this.push("root:app/goods/goods.js", { id: item.link_url });
        } else {
          this.push("root:app/app.js", item);
        }
      }
      // if (item.link_url) {
      //   this.push("root:app/app.js", item);
      // }
    },
    getpremish() {
      var pref = weex.requireModule("storage");
      pref.getItem("locationPremi", event => {
        if (event.result != "success") {
          this.showLocaTip = true;
        } else {
          this.push("root:app/main/center.js");
        }
      });
    },
    setpremish(val) {
      if (val) {
        var pref = weex.requireModule("storage");
        pref.setItem("locationPremi", val);
      }
      this.showLocaTip = false;
      // this.getNearBy();
    },

    getNearBy() {
      const location = weex.requireModule("location");
      let that = this;
      if (location && location.start) {
        location.start({ once: true }, res => {
          if (res) {
            if (res.lat) {
              this.latitude = res.lat;
              this.longitude = res.lon;
              that.getNearByList();
              if (res.province) {
                // this.dAddress = res.province + res.city + res.subLocality;
              }
            } else {
              this.push("root:app/main/center.js");
            }
          } else {
            // this.dAddress = "定位失败";
          }
        });
      } else {
        // this.dAddress = "定位失败";
      }
    },
    onrefresh(event) {
      var s = this;
      s.refreshing = true;
      let that = this;
      that.loadData(that.userId);
      setTimeout(() => {
        s.refreshing = false;
      }, 1000);
    },
    onloadmore() {
      if (this.hasMore) {
        this.page++;
        this.getGoodList();
      }
    },

    /**获取抽奖设置 */
    getLuckRuller() {
      if (!this.userId) {
        return false;
      }
      coRefundTake({ users_id: this.userId }, (res, flag) => {
        if (flag) {
          if (res.code == 200) {
            this.raffleStatus = res.data.raffle.status;
          } else {
            this.raffleStatus = 2;
          }
        }
      });
    },
    getNearByList() {
      let that = this;
      if (this.latitude) {
        get_goods_list_nearby(
          {
            users_id: "",
            latitude: this.latitude,
            longitude: this.longitude,
            type: "1,2",
            status: "1",
            page: 1,
            page_num: "10"
          },
          (res, flag) => {
            if (flag) {
              if (res.code == "200") {
                that.secondList = res.data.list;
                var pref = weex.requireModule("storage");
                pref.setItem("mainSecond", JSON.stringify(res.data.list));
              } else {
                that.toast(res.message);
              }
            }
          }
        );
      } else {
        get_goods_list(
          {
            users_id: "",
            type: "1,2",
            status: "1",
            page: 1,
            page_num: "10"
          },
          (res, flag) => {
            if (flag) {
              if (res.code == "200") {
                that.secondList = res.data.list;
                var pref = weex.requireModule("storage");
                pref.setItem("mainSecond", JSON.stringify(res.data.list));
              } else {
                that.toast(res.message);
              }
            }
          }
        );
      }
    },
    getGoodList() {
      this.loadinging = true;
      let that = this;
      // 推荐商品
      get_goods_list(
        {
          users_id: "",
          keywords: "",
          categoryid: "",
          type: "0",
          status: "1",
          page: this.page
        },
        (res, flag) => {
          this.loadinging = false;
          if (flag) {
            if (res.code == "200") {
              that.shopTotal == res.total;
              if (this.page == 1) {
                that.shopList = res.data.list;
                var pref = weex.requireModule("storage");
                pref.setItem("mainGoods", JSON.stringify(that.shopList));
              } else {
                that.shopList = that.shopList.concat(res.data.list);
              }
              if (res.data.list.length == 0 || res.data.list.length < 10) {
                that.hasMore = false;
              }
            } else {
              that.toast(res.message);
            }
          } else {
            that.hasMore = false;
          }
        }
      );
    },
    gonext(url, parmar) {
      if (!this.userId) {
        this.push("root:app/login/login.js");
      } else {
        this.push(url, parmar);
      }
    },

    searchClick(item) {
      if (!item) {
        this.push("root:app/goods/searchGoods.js");
      } else {
        this.push("root:app/goods/searchCategroy.js", item);
      }
    },
    letfClick() {},
    rightClick() {
      this.gonext("root:app/msg/msg.js");
    }, //定时器
    Timer() {
      let that = this;
      setInterval(() => {
        if (that.countdown) {
          if (
            !(
              that.countdown.h == 0 &&
              that.countdown.m == 0 &&
              that.countdown.s == 0
            )
          ) {
            if (that.countdown.s > 0) {
              that.countdown.s--;
              that.countdown.s =
                that.countdown.s < 10
                  ? "0" + that.countdown.s
                  : that.countdown.s;
            } else if (that.countdown.m > 0) {
              that.countdown.m--;
              that.countdown.m =
                that.countdown.m < 10
                  ? "0" + that.countdown.m
                  : that.countdown.m;
              that.countdown.s = 59;
            } else if (that.countdown.h > 0) {
              that.countdown.h--;
              that.countdown.h =
                that.countdown.h < 10
                  ? "0" + that.countdown.h
                  : that.countdown.h;
              that.countdown.m = 59;
              that.countdown.s = 59;
            }
          }
        }
      }, 1000);
    },
    loadPromotion() {
      let cutTime = new Date();
      let yy = cutTime.getFullYear(),
        mm = cutTime.getMonth() + 1,
        dd = cutTime.getDate();
      let h1 = cutTime.getHours();
      let tmpcountdown = yy + "/" + mm + "/" + dd + " " + h1 + ":59:59";
      let h = "00",
        m = "00",
        s = "00";
      let currentTime = new Date();
      let cutoffTime = new Date(tmpcountdown);
      if (!(currentTime >= cutoffTime)) {
        let countTime = parseInt(
          (cutoffTime.getTime() - currentTime.getTime()) / 1000
        );
        h = parseInt(countTime / 3600);
        m = parseInt((countTime % 3600) / 60);
        s = countTime % 60;
        h = h < 10 ? "0" + h : h;
        m = m < 10 ? "0" + m : m;
        s = s < 10 ? "0" + s : s;
      }
      this.countdown = {
        h: h,
        m: m,
        s: s
      };
      this.Timer();
    }
  }
};
</script>

<style scoped lang="less">
.tipsMask {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  justify-content: center;
  align-items: center;
  z-index: 30;
}
.locaTip {
  width: 600px;
  padding: 32px;
  border-radius: 10px;
  background-color: #fff;

  box-shadow: 0 0 10px #ccc;
}
.locatipCen {
  font-size: 32px;
  color: #000;
  margin-bottom: 30px;
  text-align: center;
}
.locationItem {
  margin: 10px 0;
  border-width: 1px;
  border-color: #e6e6e6;
  border-style: solid;
  font-size: 30px;
  border-radius: 10px;
  padding: 20px 10px;
}
.locationItem:active {
  background-color: #e6e6e6;
}
.loadingMore {
  width: 750;
  display: -ms-flex;
  display: -webkit-flex;
  display: flex;
  -ms-flex-align: center;
  -webkit-align-items: center;
  -webkit-box-align: center;
  align-items: center;
}
.iconfont {
  font-family: iconfont;
}
.rightBox {
  justify-content: center;
  align-items: center;
  flex-direction: row;
  // background-color: #fff;
  flex: 1;
  &:active {
    background-color: #222222;
  }
}
.layout {
  background-color: #f2f2f2;
  flex: 1;
}
.leftIcon {
  color: #ffffff;
  font-size: 40px;
}
.loadingbox {
  align-items: center;
  padding: 20px;
  height: 80px;
  margin: 40px 0;
  text-align: center;
  color: #999999;
  font-size: 16px;
}
.indicators {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  item-color: #ddd;
  item-selected-color: #ba8833;
}
.loading {
  height: 40px;
  width: 40px;
}

.pageContent {
  flex: 1;
  position: relative;
}

.scroller {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
}

.header {
  height: 400px;
  /* padding-top: 45px; */
  justify-content: flex-start;
  align-items: center;
  background-color: #303030;
}

.refresh {
  width: 750px;
  -ms-flex-align: center;
  -webkit-align-items: center;
  -webkit-box-align: center;
  align-items: center;
}

.indicator {
  margin-top: 20px;
  margin-bottom: 20px;
  height: 80px;
  width: 80px;
  color: #fff;
}

.inputbox {
  background-color: #fff;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  height: 62px;
  border-radius: 4px;
  // border:2px solid rgba(225,225,225,1);
  width: 686px;
  padding: 0 40px;
  margin: 0 32px;
  /* margin-left: 32px; */
}
.logoBox {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.mlogo {
  width: 43px;
  height: 37px;
  margin-right: 5px;
}
.logoTxt {
  font-size: 32px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: rgba(255, 255, 255, 1);
}
.searchIcon {
  color: #666;
  margin-right: 15px;
  font-size: 30px;
}
.noteBook {
  font-size: 28px;
  font-family: PingFangSC-Regular, PingFangSC;
  font-weight: 400;
  color: rgba(153, 153, 153, 1);
  line-height: 40px;
}

.cicle {
  background-color: #f2f2f2;
  border-top-left-radius: 600px;
  border-bottom-right-radius: 600px;
  width: 750px;
  height: 750px;
  transform: rotate(45deg);
  margin-top: 30px;
}

.cicleContent {
  margin-top: -750px;
}

.tips {
  color: #666;
  font-size: 22px;
  text-align: center;
}

.img {
  width: 200px;
  height: 200px;
  margin-top: -100px;
}

.text {
  color: black;
  margin-top: 30px;
  font-size: 70px;
  font-weight: bold;
  margin-bottom: 50px;
}

.image {
  width: 690px;
  height: 290px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  overflow: hidden;
  background-color: #fff;
}

.silderBox {
  width: 690px;
  height: 290px;
  margin-left: 30px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  overflow: hidden;
}

.slider {
  flex: 1;
  position: relative;
}

.frame {
  width: 690px;
  height: 290px;
  position: relative;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  overflow: hidden;
}

.bgcf {
  background-color: #f2f2f2;
}

.tabSection {
  width: 690px;
  height: 350px;
  background-color: #ffffff;
  border-radius: 10px;
  margin-left: 30px;
  margin-top: 40px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding-top: 30px;
}

.tabItem {
  width: 172.5px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 10px;
  &:active {
    background-color: #f2f2f2;
  }
}

.tabImg {
  width: 90px;
  height: 90px;
}

.subSection {
  width: 690px;
  margin-left: 30px;
  margin-top: 20px;
  flex-direction: row;
  justify-content: space-between;
}

.leftSub {
  width: 330px;
  height: 230px;
  border-radius: 10px;
  background-color: #fff;
}

.subTop {
  flex-direction: row;
  padding: 20px 30px;
  justify-content: space-between;
  align-items: flex-end;
}

.topTitle {
  color: #bb8732;
  font-size: 38px;
}

.limitImg {
  width: 305px;
  margin-left: 8px;
  height: 140px;
}

.timeOut {
  flex-direction: row;
  align-items: center;
}

.timeNum {
  width: 30px;
  height: 30px;
  background-color: #bb8732;
  color: #fff;
  border-radius: 5px;
  text-align: center;
  line-height: 30px;
  font-size: 20px;
}

.timesyb {
  color: #bb8732;
  margin: 0 2px;
}

.rightSub {
  width: 330px;
  height: 230px;
  border-radius: 10px;
  background-color: #fff;
  padding: 20px 25px;
  justify-content: space-between;
  align-items: center;
}
.titleBox {
  justify-content: flex-start;
}

.rightTitle {
  font-size: 40px;
  color: #bb8732;
  height: 56px;
  line-height: 56px;
  margin-bottom: 8px;
  width: 280px;
}

.rightContent {
  font-size: 28px;
  line-height: 34px;
  color: #666;
  width: 280px;
  lines: 2;
  text-overflow: ellipsis;
}

.rightBtn {
  width: 166px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  color: #fff;
  font-size: 28px;
  background-color: rgba(186, 136, 51, 1);
  border-radius: 23px;
}

.luckImg {
  width: 686px;
  height: 138px;
  margin-left: 32px;
  margin-top: 50px;
  margin-bottom: 50px;
}

.secondHand {
  width: 750px;
  background-color: #ffffff;
  // height: 440px;
}

.secondTitle {
  height: 100px;
  flex-direction: row;
  justify-content: space-between;
  padding: 20px;
  align-items: center;
  &:active {
    background-color: #f9f9f9;
  }
}

.secondItem {
  width: 220px;
}

.secondPrice {
  flex-direction: row;
  align-items: center;
}

.mr5 {
  margin-right: 5px;
}

.titleName {
  font-size: 34px;
  color: #c09345;
}

.secondIcon {
  font-size: 32px;
  color: #666666;
}

.secondContent {
  width: 750px;
  height: 340px;
  flex-direction: row;
}

.listItem {
  padding: 20px;
  width: 240px;
  height: 340px;
}
.moteNox {
  width: 240px;
  height: 240px;
  justify-content: center;
  align-items: center;
}
.moreLink {
  width: 240px;
  height: 240px;
  line-height: 240px;
  font-size: 32px;
  text-align: center;
}
.moreLink:active {
  background-color: #f2f2f2;
}

.SecondImg {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  background-color: #f2f2f2;
}

.recommend {
  width: 690px;
  margin-left: 30px;
  margin-top: 30px;
}

.retitle {
  width: 690px;
  padding: 20px 0;
  font-size: 30px;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
}

.fz30 {
  font-size: 34px;
}

.reIcon {
  color: #666666;
  font-size: 28px;
}

.recontent {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-bottom: 10px;
}

.reitem {
  height: 516px;
  margin-top: 10px;
  margin-bottom: 10px;
  background-color: #fff;
  border-radius: 10px;
  /* justify-content: space-between; */
}
.reitem:active {
  background-color: #f6f6f6;
}

.goodsImg {
  width: 336px;
  height: 336px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.contentBox {
  width: 336px;
  padding: 0 20px;
}

.goodsTitle {
  font-size: 20px;
  height: 56px;
  line-height: 28px;
  margin-top: 12px;
  color: #1e1e1e;
  text-overflow: ellipsis;
  lines: 2;
}
.goodsDistance {
  font-size: 12px;
}

.goodsTitle2 {
  font-size: 26px;
  height: 74px;
  line-height: 37px;
  margin-top: 16px;
  color: #1e1e1e;
  text-overflow: ellipsis;
  lines: 2;
}

.priceInfo {
  margin-top: 20px;
  flex-direction: row;
  justify-content: space-between;
}

.leftInfo {
  flex-direction: row;
  align-items: flex-end;
}

.symbol {
  color: red;
  // margin-bottom: 5px;
  font-size: 20px;
  line-height: 20px;
}

.money {
  color: red;
  font-size: 32px;
  line-height: 32px;
  font-weight: bold;
  margin-right: 5px;
}

.reduce {
  color: red;
  margin-right: 5px;
}

.shopType {
  color: red;
}

.shopIcon {
  font-size: 32px;
  margin-left: 10px;
}

.user {
  flex-direction: row;
  margin-top: 15px;
}

.avator {
  width: 40px;
  height: 40px;
  border-radius: 40px;
  margin-top: 15px;
}

.userInfo {
  flex: 1;
  padding-left: 15px;
}
.tipsinput {
  color: #666;
  font-size: 28px;
}
.userName {
  font-size: 32px;
  color: #333;
}

.c666 {
  color: #666;
  margin-top: 5px;
}
</style>
